package com.andova.component;

import android.app.Service;

import com.andova.component.log.AndovaLogComponent;

/**
 * Created by Administrator on 2018-09-12.
 *
 * @author kzaxil
 * @since 1.0.0
 */
public abstract class AndovaComponentService extends Service {
    protected final void i(Object msg) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.i(msg);
    }

    protected final void i(Object msg, Throwable t) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.i(msg, t);
    }

    protected final void d(Object msg) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.d(msg);
    }

    protected final void d(Object msg, Throwable t) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.d(msg, t);
    }

    protected final void w(Object msg) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.w(msg);
    }

    protected final void w(Object msg, Throwable t) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.w(msg, t);
    }

    protected final void e(Object msg) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.e(msg);
    }

    protected final void e(Object msg, Throwable t) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.e(msg, t);
    }

    protected final void t(Object msg) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.t(msg);
    }

    protected final void t(Object msg, Throwable t) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.t(msg, t);
    }

    protected final void v(Object msg) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.v(msg);
    }

    protected final void v(Object msg, Throwable t) {
        AndovaLogComponent component = AndovaComponentManager.getInstance().logComponent();
        if (component == null) return;
        component.v(msg, t);
    }
}
